//
//  UIButton+YDYExtention.m
//  DY_Bilibili
//
//  Created by 杨德勇 on 2016/9/23.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import "UIButton+YDYExtention.h"

@implementation UIButton (YDYExtention)


+(UIButton *)ydy_BtnWithImageName:(NSString *)imgName{
    UIButton *btn = [[UIButton alloc]init];
    [btn setImage:[UIImage imageNamed:imgName] forState:UIControlStateNormal];
    
    NSString *selectedImgName = [imgName stringByAppendingString:@"_s"];
    [btn setImage:[UIImage imageNamed:selectedImgName] forState:UIControlStateHighlighted];
    
    return btn;
}
@end
